<?php
$issues = $this->issues;
$total = $this->total;
?>

<div class="content-box">

    <div class="content-box-header">
        <h3>Выпуски журналов</h3>
        <ul class="content-box-tabs">
            <li><a class="default-tab" href="#tab1">Таблица</a></li>
        </ul>
        <div class="clear"></div>
    </div>
    <div class="content-box-content">
        <a class="btn" href="/admin/issue/add">Добавить выпуск</a>
        <div class="tab-content default-tab" id="tab1">
            <table class="table table-striped">

                <thead>
                <tr>
                    <th>#</th>
                    <th>Имя</th>
                    <th></th>
                </tr>
                </thead>

                <tbody>
                <?php foreach ($issues as $issue): ?>
                    <tr>
                        <td><?php echo $issue['id'] ?></td>
                        <td><?php echo $this->escape($issue['name']);?></td>
                        <td>
                            <a href="/admin/issue/edit/id/<?php echo $issue['id'] ?>" class="btn">Edit</a>
                            <a href="/admin/issue/delete/id/<?php echo $issue['id'] ?>"  class="btn btn-danger delete">Delete</a>
                        </td>
                    </tr>
                    <?php endforeach; ?>
                </tbody>
            </table>

            <?php echo $this->partial('/paginator/common.phtml', array('paginator' => $this->paginator)) ?>
        </div>
    </div>
</div>